1.Field
The present disclosure pertains to the field of information processing, and more particularly, to the field of memory management in a virtual machine environment.
2.Description of Related Art
Generally, the concept of virtualization in information processing systems allows multiple instances of one or more operating systems (each, an “OS”) to run on a single information processing system, even though each OS is designed to have complete, direct control over the system and its resources. Virtualization is typically implemented by using software (e.g., a virtual machine monitor, or a “VMM”) to present to each OS a “virtual machine” (“VM”) having virtual resources, including one or more virtual processors, that the OS may completely and directly control, while the VMM maintains a system environment for implementing virtualization policies such as sharing and/or allocating the physical resources among the VMs (the “virtualization environment”). Each OS, and any other software, that runs on a VM is referred to as a “guest” or as “guest software,” while a “host” or “host software” is software, such as a VMM, that runs outside of, and may or may not be aware of, the virtualization environment.
A physical processor in an information processing system may support virtualization, for example, by supporting an instruction to enter a virtualization environment to run a guest on a virtual processor (i.e., a physical processor under constraints imposed by a VMM) in a VM. In the virtualization environment, certain events, operations, and situations, such as external interrupts or attempts to access privileged registers or resources, may be “intercepted,” i.e., cause the processor to exit the virtualization environment so that a VMM may operate, for example, to implement virtualization policies. A physical processor may also support other instructions for maintaining a virtualization environment, and may include memory or register bits that indicate or control virtualization capabilities of the physical processor.
A physical processor supporting a virtualization environment may include a memory management unit for translating virtual memory addresses to physical memory addresses. A VMM may need to retain ultimate control over the memory management unit to protect the memory space of one guest from the memory space of another guest. Therefore, prior approaches to sharing information between guests have included adding portions of each guests' memory space to the VMM's memory space so that the VMM can copy information from one guest's memory space to another guest's memory space, such that each time a guest attempts to copy information to another guest, a transfer of control of the processor from the guest to the VMM and another transfer of control from the VMM back to the guest are performed. Typically, each such transfer of control from a guest to the VMM includes saving guest state and loading host state, and each such transfer of control from the VMM to the guest includes saving host state and loading guest state.